<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'show.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		#contrainer{
			width: 500px;
			height: 600px;
			margin: 0 auto;
		}
	</style>
  </head>
  
  <body>
  <div id="contrainer">
<form action="aqi/aqiAction!disShow?page.nowpage=1" method="post">
  	<table>
		<tr>
			<td align="right">地区名：
		    <input type="text" name="likename" size="15" height="15" value="<s:if test="num==1"><s:property value="likename"/></s:if>">
		    <input name="search" type="submit" id="search" value="查询"></td>
		</tr>
		<tr>
			<input type="button" value="返回" onclick="javascript:location.href='aqi/aqiAction!show?page.nowpage=1&type=${type}'"></td>
		</tr>
	</table>
</form>
  	<table border="1px">
   		<tr>
   			<td style="width: 15%">序号</td>
   			<td style="width: 15%">区域</td>
			<td>操作</td>
   		</tr>
   		<s:if test="page.getlist.size!=0">
	   		<s:iterator value="page.getlist">
	   			<tr>
		   			<td>${id}</td>
		   			<td>${name}</td>
		   			<td>
		   				<a href="aqi/aqiAction!toModifyDis?dis.id=${id}&page.nowpage=${page.nowpage}&likename=${likename}">修改</a>
		   				<a href="aqi/aqiAction!deleteDis?dis.id=${id}&page.nowpage=${page.nowpage}&likename=${likename}">删除</a>
		   			</td>
	   			</tr>
	   		</s:iterator>
   		</s:if>
   		<s:if test="page.getlist.size==0">
	   			<tr>
		   			<td colspan="6"><h1><span>抱歉,暂无数据</span></h1></td>
	   			</tr>
   		</s:if>
   	</table>
   	<div>
				第${page.nowpage }页 共${page.allpage }页 <a
					href="aqi/aqiAction!disShow?page.nowpage=1">首页</a>
				<s:if test="%{page.nowpage>1 }">
					<a
						href="aqi/aqiAction!disShow?page.nowpage=${page.nowpage-1 }">上一页</a>
				</s:if>
				<s:if test="%{page.nowpage<=1 }">
					<a href="javascript:void(0)">上一页</a>
				</s:if>
				<s:if test="%{page.nowpage<page.allpage }">
					<a
						href="aqi/aqiAction!disShow?page.nowpage=${page.nowpage+1 }">下一页</a>
				</s:if>
				<s:if test="%{page.nowpage>=page.allpage }">
					<a href="javascript:void(0)">下一页</a>
				</s:if>
				<a
					href="aqi/aqiAction!disShow?page.nowpage=${page.allpage }">尾页</a>
				转至 <select name="select"
					onChange="javacript:location.href='aqi/aqiAction!disShow?page.nowpage='+this.options[this.selectedIndex].value;">
					<s:iterator var="p" begin="1" end="%{page.allpage }" status="st">
						<option value="<s:property value="#p"/>"
							<s:if test="%{page.nowpage==#p }">selected</s:if>>
							<s:property value="#p" />
						</option>
					</s:iterator>
				</select> 页
			</div>
	</div>
  </body>
</html>
